package com.corona.game;

import com.corona.Game;

import java.util.HashMap;

/* compiled from: Action.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/PickupItem.class */
public class PickupItem extends Action {
    HashMap<String, Integer> items;
    String whichItem;

    public PickupItem(HashMap<String, Integer> items, String whichItem, Action nextAction) {
        super(new Object[0]);
        this.items = items;
        this.whichItem = whichItem;
        this.nextAction = nextAction;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        game.insertAction(new PlayMusic("seed1", (Action) null));
        HashMap<String, Integer> items = new HashMap<>();
        this.items.remove(this.whichItem);
        if (this.whichItem.equals("torch")) {
            items.put("log", 1);
            items.put("grass", 1);
            game.insertAction(new DrawItemPickup(items, null));
        }
        game.actionStack.remove(this);
        game.insertAction(this.nextAction);
    }
}
